#include <iostream>
#include "matrix.hpp"
#include "expr.hpp"

int main(int argc, char *argv[]) {
/*
	std::size_t rows = 5;
	std::size_t columns = 7;
	tws::Matrix<tws::Diagonal<float>> mat = tws::Matrix<tws::Diagonal<float>>(rows,columns,-1.0);
	std::cout << mat << std::endl;
	for(size_t i = 1; i<std::min(rows,columns)+1; i++)
	{
		mat(i-1)=i;
	}
	std::cout << mat << std::endl;
	tws::Matrix<tws::ColumnMajor<float>> mat2 = tws::Matrix<tws::ColumnMajor<float>>(rows,columns,-1.0);
	mat2(1,3) = 2.0;
	std::cout << mat2 << std::endl;
	tws::Matrix<tws::RowMajor<float>> mat3 = tws::Matrix<tws::RowMajor<float>>(rows,columns,-1.0);
	mat3(1,3) = 10;
	std::cout << mat3 << std::endl;
	rows = 8000;
	columns = 8000;
	tws::Matrix<tws::ColumnMajor<float>> mat4 = tws::Matrix<tws::ColumnMajor<float>>(rows,columns,-1.0);
	mat4(1,3) = 10;
	std::cout << "MaxNorm:  " << max_norm(mat4) << std::endl;
*/
	const std::size_t N = 5;
	tws::Matrix<tws::Diagonal<double>> D(N,N,-1);
	tws::Matrix<tws::ColumnMajor<double>> A(N,N,1);
	std::cout << A << std::endl;
	std::cout << D << std::endl;
	auto C = D * A + D;
	std::cout << C(0,0) << std::endl;
	tws::Matrix<tws::RowMajor<double>> E(N,N,1);
	E=C;
	E(1,1)=3;
	std::cout << E << std::endl;
	tws::Matrix<tws::Symmetric<double>> F(N,N,1);
	tws::Matrix<tws::RowMajor<float>> G(N,N,2);
	F(2,1)=2.33443344334433443344;
	F(2,2)=4;
	E=G+F;
	std::cout << E << std::endl;
	return 0;

}
